1. Field of the Invention
This invention relates generally to the field of image capture and image processing. More particularly, the invention relates to an apparatus and method for capturing still images and video using coded lens techniques.
2. Description of the Related Art
Photographic imaging is commonly done by focusing the light coming from a scene using a single glass lens which is placed in front of a light sensitive detector such as a photographic film or a semiconductor sensor including CCD and CMOS sensors.
For imaging high-energy radiation such as x-ray or gamma rays, other techniques must be used because such radiation cannot be diffracted using glass lenses. A number of techniques have been proposed including single pinhole cameras and multi-hole collimator systems. A particularly beneficial technique is “coded aperture imaging” wherein a structured aperture, consisting of a suitably-chosen pattern of transparent and opaque elements, is placed in front of a detector sensitive to the radiation to be imaged. When the aperture pattern is suitably chosen, the imaged scene can be digitally reconstructed from the detector signal. Coded aperture imaging has the advantage of combining high spatial resolution with high light efficiency. Coded aperture imaging of x-ray and gamma ray radiation using structured arrays of rectangular or hexagonal elements is known from R. H. Dicke: SCATTER-HOLE CAMERA FOR X-RAYS AND GAMMA RAYS. ASTROHYS. J., 153:L101-L106, 1968 (hereinafter “Dicke”), and has been extensively applied in astronomical imaging and nuclear medicine.
A particularly useful class of coded imaging systems is known from E. E. Fenimore and T. M. Cannon: CODED APERTURE IMAGING WITH UNIFORMLY REDUNDANT ARRAYS. APPL. OPT., 17:337-347, 1978 (hereinafter “Fenimore”). In this class of systems, a basic aperture pattern is cyclically repeated such that the aperture pattern is a 2×2 mosaic of the basic pattern. The detector has at least the same size as the basic aperture pattern. In such a system, the “fully coded FOV” (“FOV” shall be used herein to refer to “field-of-view”) is defined as the area within the FOV, within which a point source would cast a complete shadow of a cyclically shifted version of the basic aperture pattern onto the aperture. Likewise, the “partially coded FOV” is defined as the area within the FOV, within which a point source would only cast a partial shadow of the basic aperture pattern onto the aperture. According to Dicke, a collimator is placed in front of the detector which limits the FOV to the fully coded FOV, thus allowing an unambiguous reconstruction of the scene from the detector signal.
From J. Gunson and B. Polychronopulos: OPTIMUM DESIGN OF A CODED MASK X-RAY TELESCOPE FOR ROCKET APPLICATIONS. MON. NOT. R. ASTRON. SOC., 177:485-497, 1976 (hereinafter “Gunson”) it is further known to give the opaque elements of the aperture a finite thickness such that the aperture itself acts as a collimator and limits the FOV to the fully coded FOV. Such a “self-collimating aperture” allows the omission of a separate collimator in front of the detector.
It should be noted that besides limiting the FOV, a collimator has the undesired property of only transmitting light without attenuation which is exactly parallel to the optical axis. Any off-axis light passing through the collimator is attenuated, the attenuation increasing towards the limits of the FOV. At the limits of the FOV, the attenuation is 100%, i.e., no light can pass through the collimator at such angles. This effect will be denoted as “collimator attenuation” within this document. Both in the x-direction and in the y-direction, collimator attenuation is proportional to the tangent of the angle between the light and the optical axis.
After reconstructing an image from a sensor signal in a coded aperture imaging system, the effect of collimator attenuation may have to be reversed in order to obtain a photometrically correct image. This involves multiplying each individual pixel value with the inverse of the factor by which light coming from the direction which the pixel pertains to, has been attenuated. It should be noted that close to the limits of the FOV, the attenuation, especially the collimator attenuation, is very high, i.e. this factor approaches zero. Inverting the collimator attenuation in this case involves amplifying the pixel values with a very large factor, approaching infinity at the limits of the FOV. Since any noise in the reconstruction will also be amplified by this factor, pixels close to the limits of the FOV may be very noisy or even unusable.
In a coded aperture system according to Fenimore or Gunson, the basic aperture pattern can be characterized by means of an “aperture array” of zeros and ones wherein a one stands for a transparent and a zero stands for an opaque aperture element. Further, the scene within the FOV can be characterized as a two-dimensional array wherein each array element contains the light intensity emitted from a single pixel within the FOV. When the scene is at infinite distance from the aperture, it is known that the sensor signal can be characterized as the two-dimensional, periodic cross-correlation function between the FOV array and the aperture array. It should be noted that the sensor signal as such has no resemblance with the scene being imaged. However, a “reconstruction filter” can be designed by computing the two-dimensional periodic inverse filter pertaining to the aperture array. The two-dimensional periodic inverse filter is a two-dimensional array which is constructed in such a way that all sidelobes of the two-dimensional, periodic cross-correlation function of the aperture array and the inverse filter are zero. By computing the two-dimensional, periodic cross-correlation function of the sensor signal and the reconstruction filter, an image of the original scene can be reconstructed from the sensor signal.
It is known from Fenimore to use a so-called “Uniformly Redundant Arrays” (URAs) as aperture arrays. URAs have a two-dimensional, periodic cross-correlation function whose sidelobe values are all identical. URAs have an inverse filter which has the same structure as the URA itself, except for a constant offset and constant scaling factor. Such reconstruction filters are optimal in the sense that any noise in the sensor signal will be subject to the lowest possible amplification during the reconstruction filtering. However, URAs can be algebraically constructed only for very few sizes.
It is further known from S. R. Gottesman and E. E. Fenimore: NEW FAMILY OF BINARY ARRAYS FOR CODED APERTURE IMAGING. APPL. OPT., 28:4344-4352, 1989 (hereinafter “Gottesman”) to use a modified class of aperture arrays called “Modified Uniformly Redundant Arrays” (MURAs) which exist for all sizes p×p where p is an odd prime number. Hence, MURAs exist for many more sizes than URAs. Their correlation properties and noise amplification properties are near-optimal and almost as good as the properties of URAs. MURAs have the additional advantage that, with the exception of a single row and a single column, they can be represented as the product of two one-dimensional sequences, one being a function only of the column index and the other being a function only of the row index to the array. Likewise, with the exception of a single row and a single column, their inverse filter can also be represented as the product of two one-dimensional sequences. This property permits to replace the two-dimensional in-verse filtering by a sequence of two one-dimensional filtering operations, making the reconstruction process much more efficient to compute.
It is further known from A. Busboom: ARRAYS UND REKONSTRUKTIONSALGORITHMEN FUER BILDGEBENDE SYSTEME MIT CODIERTER APERTUR. VDI VERLAG, DUESSELDORF, 1999, ISBN 3-18-357210-9 (hereinafter “Busboom”) to use so-called “Perfect Binary Arrays” (PBAs) which exist for all sizes 3s2r×3s2r and all sizes 3s2r−1×3s2r+1 where s=0, 1, 2 . . . and r=1, 2, 3 . . . . Hence, PBAs also exist for many sizes, especially for many square sizes with an even number of columns and rows. Their correlation properties and noise amplification properties are as good as those of URAs.
If the scene is at a finite distance from the aperture, a geometric magnification of the sensor image occurs. It should be noted that a point source in the scene would cast a shadow of the aperture pattern onto the sensor which is magnified by a factor of f=(o+a)/o compared to the actual aperture size where o is the distance between the scene and the aperture and a is the distance between the aperture and the sensor. Therefore, if the scene is at a finite distance, the sensor image needs to be filtered with an accordingly magnified version of the reconstruction filter.
If the scene is very close to the aperture, so-called near-field effects occur. The “near field” is defined as those ranges which are less than 10 times the sensor size, aperture size or distance between aperture and sensor, whichever of these quantities is the largest. If an object is in the near field, the sensor image can no longer be described as the two-dimensional cross-correlation between the scene and the aperture array. This causes artifacts when attempting to reconstructing the scene using inverse filtering. In Lanza, et al. U.S. Pat. No. 6,737,652, methods for reducing such near-field artifacts are disclosed. These methods involve imaging the scene using two separate coded apertures where the second aperture array is the inverse of the first aperture array (i.e. transparent elements are replaced by opaque elements and vice versa). The reconstruction is then computed from two sensor signals acquired with the two different apertures in such a manner that near-field artifacts are reduced in the process of combining the two sensor images.
Coded aperture imaging to date has been limited to industrial, medical, and scientific applications, primarily with x-ray or gamma-ray radiation, and systems that have been developed to date are each designed to work within a specific, constrained environment. For one, existing coded aperture imaging systems are each designed with a specific view depth (e.g. effectively at infinity for astronomy, or a specific distance range for nuclear or x-ray imaging). Secondly, to date, coded aperture imaging has been used with either controlled radiation sources (e.g. in nuclear, x-ray, or industrial imaging), or astronomical radiation sources that are relatively stable and effectively at infinity. As a result, existing coded aperture systems have had the benefit of operating within constrained environments, quite unlike, for example, a typical photographic camera using a lens. A typical photographic camera using a single lens (i.e. a single lens per sensor or film frame; stereoscopic cameras have 2 lenses, but utilize a separate sensor or film frame per lens) is designed to simultaneously handle imaging of scenes containing 3-dimensional objects with varying distances from close distances to effective infinite distance; and is designed to image objects reflecting, diffusing, absorbing, refracting, or retro-reflecting multiple ambient radiation sources of unknown origin, angle, and vastly varying intensities. No coded aperture system has ever been designed that can handle these types of unconstrained imaging environments that billions of photographic cameras with single lenses handle everyday.
Photographic imaging in the optical spectrum using a single lens has a number of disadvantages and limitations. The main limitation of single lens photography is its finite depth-of-field (DOF), particularly at large aperture settings. Only scenes at a limited DOF can be in focus in a single lens image while any objects closer or farther away from the camera than the DOF will appear blurred in the image.
Further, a single lens camera must be manually or automatically focused before an image can be taken. This is a disadvantage when imaging objects which are moving fast or unexpectedly such as in sports photography or photography of children or animals, particularly at large apertures with a short DOF. In such situations, the images may be out of focus because there was not enough time to focus or because the object moved unexpectedly when acquiring the image. Single lens photography does not allow a photographer to retrospectively change the focus once an image has been acquired.
Still further, focusing a single lens camera involves adjusting the distance between one or more lenses and the sensor. This makes it necessary for a single lens camera to contain mechanically moving parts which makes it prone to mechanical failure. Various alternatives to glass lenses, such as liquid lenses (see, e.g., B. Hendriks & Stein Kuiper: THROUGH A LENS SHARPLY. IEEE SPECTRUM, December, 2004), have been proposed in an effort to mitigate the mechanical limitations of a glass lens, but despite the added design complexity and potential limitations (e.g., operating temperature range and aperture size) of such alternatives, they still suffer from the limitation of a limited focus range.
Still further, single lens cameras have a limited dynamic range as a result of their sensors (film or semiconductor sensors) having a limited dynamic range. This is a severe limitation when imaging scenes which contain both very bright areas and very dark areas. Typically, either the bright areas will appear overexposed while the dark areas have sufficient contrast, or the dark areas will appear underexposed while the bright areas have sufficient contrast. To address this issue, specialized semiconductor image sensors (e.g. the D1000 by Pixim, Inc. of Mountain View, Calif.) have been developed that allow each pixel of an image sensor to sampled each with a unique gain so as to accommodate different brightness regions in the image. But such image sensors are much more expensive than conventional CCD or CMOS image sensors, and as such are not cost-competitive for many applications, including mass-market general photography.
Because of the requirement to focus, single lenses can provide a rough estimate of the distance between the lens and a subject object. But since most photographic applications require lenses designed to have as long a range of concurrent focus as possible, using focus for a distance estimate is extremely imprecise. Since a single lens can only be focused to a single distance range at a time, at best, a lens will provide an estimate of the distance to a single object range at a given time.
Coded Aperture Imaging (CAI) (as disclosed in co-pending application entitled “Apparatus And Method For Capturing Still Images And Video Using Coded Aperture Techniques,” Ser. No. 11/039,029, filed Jan. 18, 2005; hereinafter “CAI Application”) addresses many of the limitations of a single lens camera. Relative to a single lens camera, CAI makes it possible to make a thinner camera, a lighter camera, a camera with greater dynamic range, and also a camera which can reconstruct an image which is in focus throughout a large range of depth in the scene.
A visible light coded aperture camera according to one embodiment described in the CAI Application is illustrated in FIG. 1. The illustrated embodiment includes a coded aperture 101 placed in front of a light sensitive grayscale or color semiconductor sensor 104. The coded aperture 1012 is a pattern of circular, square, hexagonal, rectangular or other tiled elements, some of which are transparent to visible light (e.g. element 102) and some of which are opaque (e.g. element 103). Note that for illustration clarity purposes, coded aperture 101 has very few transparent elements. A typical coded aperture may have significantly more transparent elements (e.g., 50%). Visible light a from 2-dimensional or 3-dimensional scene 100 (which may be illuminated by ambient or artificial lighting) is projected through the coded aperture 101 onto image sensor 104. The camera is capable of limiting the FOV to the fully coded FOV projected onto the sensor. In one embodiment, this is implemented by the use of a self-collimating coded aperture 101 (utilizing baffles for collimation, as explained below). The space between the coded aperture and the sensor is shielded by a light-opaque housing 105 (only the outline of which is shown in FIG. 1), preventing any light from reaching the sensor other than by passing through an open element of the coded aperture.
The camera further includes an image sensor readout subsystem 110 with an interface 109 to the image sensor 104 (which may be similar to those used in prior coded aperture systems). The readout subsystem clocks out the analog image signal from the image sensor 104 and applies analog buffering, amplification and/or filtering as required by the particular image sensor. An example of such a readout subsystem 110 that also incorporates A/D 120 is the NDX-1260 CleanCapture Image Processor by NuCore Technology, Inc. of Sunnyvale, Calif. The ability to adjust the zero offset 112 and gain 111 to analog pixel values read by the readout subsystem 110 (e.g., using at least one operational amplifier (op amp)) will increase the dynamic range of the captured image, but is not essential if the image sensor has a sufficient dynamic range for the desired image quality without a zero-offset and gain adjustment.
In one embodiment, the output of the readout subsystem 110 is coupled by interface 113 to at least one analog-to-digital converter (A/D) 120 which digitizes the analog output. The output of the A/D is coupled via interface 121 to an image reconstruction processor 130, which in one embodiment incorporates a Digital Signal Processor (DSP) 132 and Random Access Memory (RAM) 131. The digitized image from the interface 121 is stored in RAM 131, and the DSP 132 post-processes the image so as to reconstruct the original scene 101 into a grayscale or color image. In accordance with another embodiment, the image reconstruction processor 130 incorporates a general purpose CPU such as an Intel Corporation Pentium 4®, or similar general purpose processor. In yet another embodiment, the image reconstruction processor 130 incorporates an Application-Specific Integrated Circuit (“ASIC”) which implements part or all of the reconstruction processing in dedicated digital structures. This grayscale or color image reconstructed by reconstruction processor 130 is output through interface 133 to be displayed on a display device 140.
However, one limitation of CAI is the resolution of the reconstructed image. The resolution of a CAI camera is limited by the larger of two primary factors: (a) the order of the aperture array, and (b) distortion in the projected image caused by diffraction. This is explained further in the following paragraphs.
FIG. 2 shows several representative coded aperture array patterns of MURAs of “order” 101, 61 and 31 (described in more detail in the CAI application). FIG. 2 also shows coded aperture array patterns of PBAs of order 8 and 24. (The PBAs 8 and 24 are shown enlarged relative to the MURAs to better show their patterns.), Note that the coded aperture array patterns are formed from a square array (with horizontal and vertical dimensions of the specified order) that is repeated twice in the horizontal and twice in the vertical dimension. So, for example, the MURA 101 pattern has a total size of 202×202. Note also that each of the aperture elements in the arrays is of the same size. Although it appears that some of the apertures are larger than others, this is simply because adjacent apertures combine to create what appears to be a larger aperture. A CAI camera can not resolve an image that is higher resolution than the order of its coded aperture array. For example, a MURA 101 CAI camera can not resolve an image of higher resolution than 101×101 pixels.
For purposes of illustration, FIG. 3 shows one embodiment of the visible light coded aperture camera shown in FIG. 1. The embodiment shown in FIG. 3 is not useful for many applications because the resolution of the reconstructed image is only 3×3 pixels, but it is illustrative of how a camera such as that shown in FIG. 1 works. A MURA order 3 (“MURA 3”) aperture array 301 contains 16 open apertures, such as open aperture 302, and 20 closed apertures, such as closed aperture 303. Color or grayscale sensor 304 is the same size as one quadrant (i.e. one 3×3 block of apertures) of the MURA 3 aperture array 301 and in this embodiment it is positioned centered relative to the MURA 3 aperture array 301.
Orthographic View 320 of FIG. 3 reveals more of the structure of the camera. Baffles (referred to as “collimators” in the CAI Application) 315 serve to collimate the light passing through open apertures, such as open aperture 302. This restricts the FOV of each aperture projection onto color or grayscale sensor 304. Closed apertures such as closed aperture 303 are covered with an opaque cover so they do not allow light to pass through. Sensor 304 is separated from MURA 3 aperture array 301 and baffles 317 to allow space for the overlapping projections from each of the open apertures. The entire unit is contained within a light-tight camera body 316, which is shown to be transparent for the purposes of illustration. Note that in this particular example, even if sensor 304 is a very high-resolution sensor, only a 3×3 pixel image can be reconstructed.
FIG. 4 illustrates how light is projected through the MURA 3 aperture array. Illustration 400 shows the MURA 3 aperture array 401 delineated by a solid black outline, with exemplary open aperture 402 and closed aperture 403. The position of color or grayscale sensor 404 is delineated by a dotted outline. Open aperture 405 is delineated by a dashed line. The light that passes through aperture 405 projects onto a square area on the sensor plane shown as a gray square 406. Note that because aperture array 401 is shown overlaying the projection in illustration 400, much of projection 406 is obstructed by closed apertures. Nonetheless, the perimeter of projection 406 can be seen delineated by a solid gray outline.
In this embodiment, projection 406 is a square approximately 9 times larger than aperture 405 and centered on aperture 405. Depending on how close or far sensor 404 is to the aperture array, this projection may correspond to a wider or narrower FOV. Baffles around aperture 405 (not shown in this illustration, but visible as baffles 317 in FIG. 3) are used in this embodiment to limit the extent of projection 406 to approximately 9 times larger than the size of aperture 405.
Note that in this embodiment only a small percentage of the area of projection 406 overlaps sensor 404. Part of this overlap is visible through an open aperture 409 and part of it is obscured by closed aperture 408.
Illustration 410 shows the overlaying of the 4 projections from the upper right quadrant of aperture array 401. (For clarity, in illustrations 410 and 420, only the outline of MURA 3 aperture array 401 is shown.) The 4 open apertures 415 in the upper right quadrant are delineated with dashed outlines. The 4 projections 416 from these 4 apertures are shown as overlapping gray areas. Each projection, like the projection 406 shown in illustration 400, is a square approximately 9 times the size of its aperture and is centered on its aperture, and is delineated by a solid gray line. To indicate the number of overlapping projections in each area of the sensor plane, varying levels of gray scale are used to fill each area. The lightest gray indicates 1 projection, the next darker indicates 2 projections overlapping, the next darker indicates 3 projections overlapping, and finally the darkest indicates 4 projections overlapping.
Illustration 420 shows the overlaying of all 16 projections from the entire aperture array 401. The 16 open apertures 425 are delineated by dashed outlines. Each projection, like the projection 406 shown in illustration 400, is a square approximately 9 times the size of its aperture and centered on its aperture, and is delineated by a solid gray line. To indicate the number of overlapping projections in each area of the sensor plane, varying levels of gray scale are used as described in the previous paragraph. Note that in this embodiment each area of sensor 404 is shown covered by 4 overlapping projections. In practice, it is correct that there will be 4 overlapping projections over the vast majority of the sensor area, but because of tolerance variations, diffraction effects, and varying distances to objects in the observed scene, there may be fewer or more overlapping projections near the borders of projections, which are shown as solid gray lines in illustration 411.
Note also that most of the light hitting the MURA 3 aperture array 401 is projected beyond the edges of sensor 404, and as a result this light is not used for the reconstruction. If the area of the rightmost column of the MURA 3 aperture array 401 is disregarded (since all apertures in that column are closed, it does not contribute any light to the camera and can be removed from the system without impacting the image reconstruction), approximately 13% of the light hitting the remaining area of the MURA 3 aperture array 401 is actually projected onto the sensor 404. A conventional single f/2.8 lens transmits approximately 12.7% of the light hitting the lens, so the 13% light transmission performance of this MURA 3 coded aperture array camera can be seen as comparable to a conventional f/2.8 lens.
Generally speaking, f/2.8 is good light transmission performance for a photographic lens, so the description of the MURA 3 coded aperture camera in the last few paragraphs characterizes a camera with potentially desirable light transmission characteristics. Unfortunately, only a 3×3 pixel image can be reconstructed by the system described.
Each element in a CAI camera acts geometrically like a pinhole in a pinhole camera. Light passing through each aperture makes a projection onto the sensor, just as it would in a pinhole camera. And like a pinhole camera, a CAI camera is subject to the diffraction effects of light passing through a pinhole. In a pinhole, these diffraction effects create a point source projected pattern commonly known as the “Airy disk”. The primary lobe of the Airy disk roughly defines the smallest resolvable spot size from a given pinhole camera projection. At a given distance from the pinhole to the sensor, the Airy disk increases in size as the pinhole decreases in size. From a geometric point of view, the resolution (i.e. minimum point source projection spot size) of images from a pinhole camera also increases as the pinhole gets smaller. So, for any given distance of pinhole to sensor, there is an optimum pinhole size where the point source projection spot size equals the size of the primary lobe of the Airy disk. If the pinhole is made smaller than this optimum size, resolution decreases because the Airy disk increases in size. If the pinhole is made larger than this optimum size, resolution decreases because a point source projection spot size increases. Since the characterization of resolution of a pinhole camera is subjective, different formulae have been proposed for calculating the optimal pinhole diameter. One such formula is A=SQRT(55F), where A is the pinhole diameter in thousandths of an inch, F is the camera focal length in inches, and SQRT( ) is the square root function.
Note that achievable resolution in a pinhole camera increases as the focal length of the camera increases. Unfortunately, the physical size of the camera typically increases in proportion to the focal length, and as a result, a very large camera is needed for high resolution pinhole images. For example (using the formula A=SQRT(55F)), the optimal pinhole size of a 1″ focal length (i.e. 1″ thick) pinhole camera is about 0.007″. For a “normal” viewing angle of about 53°, this results in about a 134.8 pixel diagonal dimension, or about a 95×95 pixel resolution image. The optimal pinhole size of a 10″ focal length (i.e. 10″ thick) pinhole camera is about 0.023″. With a 53° viewing angle, this results in about a 426.4 diagonal resolution, or about a 301×301 resolution image. (Note that different photographers will use different subjective criteria in assessing the resolvable resolution of a pinhole camera. The resolution calculated here is based on one interpretation of resolvable resolution. Other interpretations may lead higher or lower resolution assessments, but will normally be within a 2× range higher or lower than the numbers presented here.)
Like pinhole cameras, visible light CAI cameras are also subject to diffraction effects which may result in resolution/size trade-offs. The diffraction patterns are more complex than pinhole diffraction patterns because of the complexity of the aperture patterns, and consequently, determining the impact on image resolution and/or camera size requirements is more complex. But because the pixel resolution of the CAI image can be no higher than the order of the aperture array, to achieve a high-resolution image it is necessary to utilize high order aperture arrays which can potentially exhibit worse diffraction effects than lower order aperture arrays or, alternatively, require longer focal lengths (and, as a result, larger camera sizes) to mitigate those diffraction effects.
Another approach to improving the performance of a lens system in a digital camera is a plenoptic camera. The basic concept of a plenoptic camera is described in U.S. Pat. No. 5,076,687. Although the word “plenoptic” is not used in the patent, the device referenced in the patent is called a “plenoptic camera” by its inventor in a web page describing the camera at: http://www.bcs.mit.edu/people/jyawang/demos/plenoptic/plenoptic.html. In 2005, Stanford University researchers published a paper (Stanford Tech Report CTSR 2005-02) describing an application of a plenoptic camera implementation that achieves the DOF of a conventional f/22 lens while capturing the equivalent light from the scene that would be gathered by an f/4 lens. Unfortunately, this increase in light gathering ability comes at a theoretically linear cost of image resolution. The prototype constructed by the team resulted in about 2× beyond the theoretical resolution losses, so with a 4000×4000 pixel sensor they were able to reconstruct only a 296×296 image which exhibited the f/22 DOF with f/4 light capture (i.e. a 16 megapixel sensor yielded a 90 kilopixel image). While such a system might be useful for certain specialized applications, the enormous losses of sensor resolution would likely make such a system non-competitive for general photographic applications.